package com.ruoyi.project.manhua.mistake.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.manhua.mistake.mapper.MhClimbMistakeMapper;
import com.ruoyi.project.manhua.mistake.domain.MhClimbMistake;
import com.ruoyi.project.manhua.mistake.service.IMhClimbMistakeService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 漫画爬虫错误Service业务层处理
 *
 * @author yuan
 * @date 2021-02-10
 */
@Service
public class MhClimbMistakeServiceImpl implements IMhClimbMistakeService
{
    @Autowired
    private MhClimbMistakeMapper mhClimbMistakeMapper;

    /**
     * 查询漫画爬虫错误
     *
     * @param id 漫画爬虫错误ID
     * @return 漫画爬虫错误
     */
    @Override
    public MhClimbMistake selectMhClimbMistakeById(Long id)
    {
        return mhClimbMistakeMapper.selectMhClimbMistakeById(id);
    }

    /**
     * 查询漫画爬虫错误列表
     *
     * @param mhClimbMistake 漫画爬虫错误
     * @return 漫画爬虫错误
     */
    @Override
    public List<MhClimbMistake> selectMhClimbMistakeList(MhClimbMistake mhClimbMistake)
    {
        return mhClimbMistakeMapper.selectMhClimbMistakeList(mhClimbMistake);
    }

    /**
     * 新增漫画爬虫错误
     *
     * @param mhClimbMistake 漫画爬虫错误
     * @return 结果
     */
    @Override
    public int insertMhClimbMistake(MhClimbMistake mhClimbMistake)
    {
        mhClimbMistake.setCreateTime(DateUtils.getNowDate());
        return mhClimbMistakeMapper.insertMhClimbMistake(mhClimbMistake);
    }

    /**
     * 修改漫画爬虫错误
     *
     * @param mhClimbMistake 漫画爬虫错误
     * @return 结果
     */
    @Override
    public int updateMhClimbMistake(MhClimbMistake mhClimbMistake)
    {
        mhClimbMistake.setUpdateTime(DateUtils.getNowDate());
        return mhClimbMistakeMapper.updateMhClimbMistake(mhClimbMistake);
    }

    /**
     * 删除漫画爬虫错误对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMhClimbMistakeByIds(String ids)
    {
        return mhClimbMistakeMapper.deleteMhClimbMistakeByIds(Convert.toStrArray(ids));
    }

    @Override
    public int deleteMhClimbMistakeByNameId(Long id) {
        return mhClimbMistakeMapper.deleteMhClimbMistakeByNameId(id);
    }

    @Override
    public int deleteMhClimbMistakeByChapterId(Long id) {
        return mhClimbMistakeMapper.deleteMhClimbMistakeByChapterId(id);
    }

    @Override
    public int deleteMhClimbMistakeByPageId(Long id) {
        return mhClimbMistakeMapper.deleteMhClimbMistakeByPageId(id);
    }

    /**
     * 删除漫画爬虫错误信息
     *
     * @param id 漫画爬虫错误ID
     * @return 结果
     */
    @Override
    public int deleteMhClimbMistakeById(Long id)
    {
        return mhClimbMistakeMapper.deleteMhClimbMistakeById(id);
    }
}
